Fix bug #9470 with slow redisplay in huge single-paragraph buffers.
authorEli Zaretskii <eliz@gnu.org>
Sat, 17 Sep 2011 15:18:56 +0000 (18:18 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 17 Sep 2011 15:18:56 +0000 (18:18 +0300)
commit07c774cb21ac8d290b3ad428eab70c3f2cc0b002
tree8a48ff635a76a67748754dd86b75408d7c7c1817
parent21b796d6f950b453df0e712d86f65b66f104dc86
Fix bug #9470 with slow redisplay in huge single-paragraph buffers.

 src/bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
 (bidi_find_paragraph_start): Search back for paragraph beginning
 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
 (bidi_move_to_visually_next): Only trigger paragraph-related
 computations when the last character is a newline or at EOB, not
 just any NEUTRAL_B.
 src/xdisp.c (reseat_at_next_visible_line_start): Keep information
 about the current paragraph and restore it after the call to
 reseat.
src/ChangeLog
src/bidi.c
src/xdisp.c